import axios from './network'

//  获得回款列表
function getReturnList(){
  return axios({
    url:'orders/customer_back'
  })
}

//  获得回款详情
function getReturnDetail(order_id){
  return axios({
    url:'orders/pay_detail',
    data:{
      order_id
    }
  })
}
//  获取订单大厅列表
function getOrderList(){
  return axios({
    url:"orders/servicer_order"
  })
}

//  获得订单大厅被退回列表
function getRefuseOrder(){
  return axios({
    url:'orders/refuse_order'
  })
}

//  获得订单大厅进行中列表
function getOrderIng(){
  return axios({
    url:'orders/process_order'
  })
}

//    获取已完成的订单
function getSuccessBill(){
  return axios({
    url:'orders/success_order'
  })
}


//   获得支付汇总
function getPayAll(order_id){
  return axios({
    url:"orders/pay_all",
    data:{
      order_id
    }
  })
}

//   获得订单详情
function getOrderDetail(data){
  return axios({
    url:'orders/order_detail',
    data
  })
}

//  获得跟单业务员
function getOrderService(order_id){
  return axios({
    url:'orders/order_service',
    data:{
      order_id
    }
  })
}

//   发送支付信息
function sendPayInfo(data){
  return axios({
    url:'orders/pay_info',
    method:"POST",
    data
  })
}

//  添加跟单业务员
function sendOrderService(data){
  return axios({
    url:'orders/order_service_add',
    data
  })
}

// 撤销订单
function cancelOrder(order_id){
  return axios({
    url:'api/orders/cancel_order',
    data:{
      order_id
    }
  })
}



export{
  getReturnList,
  getReturnDetail,
  getPayAll,
  sendPayInfo,
  getOrderService,
  getRefuseOrder,
  sendOrderService,
  getSuccessBill,
  getOrderDetail,
  getOrderIng,
  getOrderList,
  cancelOrder,
}